home *** CD-ROM | disk | FTP | other *** search
/ Aminet 35 / Aminet 35 (2000)(Schatztruhe)[!][Feb 2000].iso / Aminet / gfx / misc / gnuplot-src.lha / gnuplot-3.7.1src / gnuplot-3.7.1.lha / gnuplot-3.7.1 / syscfg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-16  |  9.3 KB  |  424 lines

  1. /*
  2.  * $Id: syscfg.h,v 1.9.2.3 1999/10/16 15:09:54 lhecking Exp $
  3.  *
  4.  */
  5.  
  6. /* GNUPLOT - syscfg.h */
  7.  
  8. /*[
  9.  * Copyright 1986 - 1993, 1998   Thomas Williams, Colin Kelley
  10.  *
  11.  * Permission to use, copy, and distribute this software and its
  12.  * documentation for any purpose with or without fee is hereby granted,
  13.  * provided that the above copyright notice appear in all copies and
  14.  * that both that copyright notice and this permission notice appear
  15.  * in supporting documentation.
  16.  *
  17.  * Permission to modify the software is granted, but not the right to
  18.  * distribute the complete modified source code.  Modifications are to
  19.  * be distributed as patches to the released version.  Permission to
  20.  * distribute binaries produced by compiling modified sources is granted,
  21.  * provided you
  22.  *   1. distribute the corresponding source modifications from the
  23.  *    released version in the form of a patch file along with the binaries,
  24.  *   2. add special version identification to distinguish your version
  25.  *    in addition to the base release version number,
  26.  *   3. provide your name and address as the primary contact for the
  27.  *    support of your modified version, and
  28.  *   4. retain our contact information in regard to use of the base
  29.  *    software.
  30.  * Permission to distribute the released version of the source code along
  31.  * with corresponding source modifications in the form of a patch file is
  32.  * granted with same provisions 2 through 4 for binary distributions.
  33.  *
  34.  * This software is provided "as is" without express or implied warranty
  35.  * to the extent permitted by applicable law.
  36. ]*/
  37.  
  38. /* This header file provides system dependent definitions. New features
  39.  * and platforms should be added here.
  40.  */
  41.  
  42. #ifndef SYSCFG_H
  43. #define SYSCFG_H
  44.  
  45. #ifdef HAVE_CONFIG_H
  46. # include "config.h"
  47. #endif
  48.  
  49. #include "ansichek.h"
  50.  
  51. /*
  52.  * Define operating system dependent constants [default value]:
  53.  *
  54.  * OS:       [" "] Name of OS plus trailing space
  55.  * HELPFILE: ["docs/gnuplot.gih"] Location of helpfile - overridden by Makefile
  56.  * HOME:     ["HOME"] Name of environment variable which points to
  57.  *           the directory where gnuplot's config file is found.
  58.  * PLOTRC:   [".gnuplot"] Name of the gnuplot startup file.
  59.  * SHELL:    ["/bin/sh"] Name, and in some cases, full path to the shell
  60.  *           that is used to run external commands.
  61.  * DIRSEP1:  ['/'] Primary character which separates path components.
  62.  * DIRSEP2:  ['\0'] Secondary character which separates path components.
  63.  *        
  64.  */
  65.  
  66. #if defined(AMIGA_SC_6_1) || defined(AMIGA_AC_5) || defined(__amigaos__)
  67. # define OS "Amiga "
  68. # ifndef __amigaos__
  69. #  define HELPFILE "S:gnuplot.gih"
  70. #  define HOME     "GNUPLOT"
  71. #  define SHELL    "NewShell"
  72. #  define DIRSEP2  ':'
  73. # endif
  74. # ifndef AMIGA
  75. #  define AMIGA
  76. # endif
  77. /* Fake S_IFIFO for SAS/C
  78.  * See stdfn.h for details
  79.  */
  80. # ifdef AMIGA_SC_6_1
  81. #  define S_IFIFO S_IREAD
  82. # endif
  83. #endif /* Amiga */
  84.  
  85. #ifdef ATARI
  86. # define OS      "TOS "
  87. # define HOME     "GNUPLOT"
  88. # define PLOTRC   "gnuplot.ini"
  89. # define SHELL    "gulam.prg"
  90. # define DIRSEP1  '\\'
  91. # ifdef MTOS
  92. #  define DIRSEP2 '/'
  93. # endif
  94. /* I hope this is correct ... */
  95. # ifdef __PUREC__
  96. #  define sscanf purec_sscanf
  97. # endif
  98. #endif /* Atari */
  99.  
  100. #ifdef DOS386
  101. # define OS       "DOS 386 "
  102. # define HELPFILE "gnuplot.gih"
  103. # define HOME     "GNUPLOT"
  104. # define PLOTRC   "gnuplot.ini"
  105. # define SHELL    "\\command.com"
  106. # define DIRSEP1  '\\'
  107. #endif /* DOS386 */
  108.  
  109. #if defined(linux) || defined(__linux)
  110. # define OS "Linux "
  111. #endif /* Linux */
  112.  
  113. #if defined(__NeXT__) || defined(NEXT)
  114. # ifndef NEXT
  115. #  define NEXT
  116. # endif
  117. #endif /* NeXT */
  118.  
  119. #ifdef OS2
  120. # define OS       "OS/2 "
  121. # define HELPFILE "gnuplot.gih"
  122. # define HOME     "GNUPLOT"
  123. # define PLOTRC   "gnuplot.ini"
  124. # define SHELL    "c:\\os2\\cmd.exe"
  125. # define DIRSEP1  '\\'
  126. #endif /* OS/2 */
  127.  
  128. #ifdef OSK
  129. # define OS    "OS-9 "
  130. # define SHELL "/dd/cmds/shell"
  131. #endif /* OS-9 */
  132.  
  133. #if defined(vms) || defined(VMS)
  134. # define OS "VMS "
  135. # ifndef VMS
  136. #  define VMS
  137. # endif
  138. # define HOME   "sys$login:"
  139. # define PLOTRC "gnuplot.ini"
  140. # ifdef NO_GIH
  141.    /* for show version long */
  142. #  define HELPFILE "GNUPLOT$HELP"
  143. # endif
  144. # if !defined(VAXCRTL) && !defined(DECCRTL)
  145. #  define VAXCRTL VAXCRTL_AND_DECCRTL_UNDEFINED
  146. #  define DECCRTL VAXCRTL_AND_DECCRTL_UNDEFINED
  147. # endif
  148. /* avoid some IMPLICITFUNC warnings */
  149. # ifdef __DECC
  150. #  include <starlet.h>
  151. # endif  /* __DECC */
  152. #endif /* VMS */
  153.  
  154. #if defined(_WINDOWS) || defined(_Windows)
  155. # ifndef _Windows
  156. #  define _Windows
  157. # endif
  158. # ifdef WIN32
  159. #  define OS "MS-Windows 32 bit "
  160. /* introduced by Pedro Mendes, prm@aber.ac.uk */
  161. #  define far
  162. /* Fix for broken compiler headers
  163.  * See stdfn.h
  164.  */
  165. #  define S_IFIFO  _S_IFIFO
  166. # else
  167. #  define OS "MS-Windows "
  168. #  ifndef WIN16
  169. #   define WIN16
  170. #  endif
  171. # endif /* WIN32 */
  172. # define HOME    "GNUPLOT"
  173. # define PLOTRC  "gnuplot.ini"
  174. # define SHELL   "\\command.com"
  175. # define DIRSEP1 '\\'
  176. #endif /* _WINDOWS */
  177.  
  178. #if defined(MSDOS) && !defined(_Windows)
  179. # if !defined(DOS32) && !defined(DOS16)
  180. #  define DOS16
  181. # endif
  182. /* should this be here ? */
  183. # ifdef MTOS
  184. #  define OS "TOS & MiNT & MULTITOS & Magic - "
  185. # endif /* MTOS */
  186. # define OS       "MS-DOS "
  187. # undef HELPFILE
  188. # define HELPFILE "gnuplot.gih"
  189. # define HOME     "GNUPLOT"
  190. # define PLOTRC   "gnuplot.ini"
  191. # define SHELL    "\\command.com"
  192. # define DIRSEP1  '\\'
  193. # ifdef __DJGPP__
  194. #  define DIRSEP2 '/'
  195. # endif
  196. #endif /* MSDOS */
  197.  
  198. /* Note: may not catch all IBM AIX compilers or SCO compilers */
  199. /* cc on NetBSD doesn't define unix anymore :-/ */
  200. #if defined(unix)|| defined(__unix) || defined(_AIX) || defined(__NetBSD__) || defined(SCO)
  201. # ifndef unix
  202. #  define unix
  203. # endif
  204. # ifndef OS
  205. #  define OS "Unix "
  206. # endif
  207. #endif /* Unix */
  208.  
  209. /* End OS dependent constants; fall-through defaults
  210.  * for the constants defined above are following.
  211.  */
  212.  
  213. #ifndef OS
  214. # define OS " "
  215. #endif
  216.  
  217. #ifndef HELPFILE
  218. # define HELPFILE "docs/gnuplot.gih"
  219. #endif
  220.  
  221. #ifndef HOME
  222. # define HOME "HOME"
  223. #endif
  224.  
  225. #ifndef PLOTRC
  226. # define PLOTRC ".gnuplot"
  227. #endif
  228.  
  229. #ifndef SHELL
  230. # define SHELL "/bin/sh"    /* used if SHELL env variable not set */
  231. #endif
  232.  
  233. #ifndef DIRSEP1
  234. # define DIRSEP1 '/'
  235. #endif
  236.  
  237. #ifndef DIRSEP2
  238. # define DIRSEP2 NUL
  239. #endif
  240.  
  241. #ifndef FAQ_LOCATION
  242. /* # define FAQ_LOCATION "http://www.uni-karlsruhe.de/~ig25/gnuplot-faq/" */
  243. /* #define FAQ_LOCATION "http://www-ihe.etec.uni-karlsruhe.de/mitarbeiter/vonhagen/gnuplot-faq.html" */
  244. #define FAQ_LOCATION "http://www.ucc.ie/gnuplot/gnuplot-faq.html"
  245. #endif
  246.  
  247. #ifndef CONTACT
  248. # define CONTACT "bug-gnuplot@dartmouth.edu"
  249. #endif
  250.  
  251. #ifndef HELPMAIL
  252. # define HELPMAIL "info-gnuplot@dartmouth.edu"
  253. #endif
  254. /* End fall-through defaults */
  255.  
  256. /* Atari stuff. Moved here from command.c, plot2d.c, readline.c */
  257. #if defined(ATARI) || defined(MTOS)
  258. # ifdef __PUREC__
  259. #  include <ext.h>
  260. #  include <tos.h>
  261. #  include <aes.h>
  262. # else
  263. #  include <osbind.h>
  264. #  include <aesbind.h>
  265. #  include <support.h>
  266. # endif                         /* __PUREC__ */
  267. #endif /* ATARI || MTOS */
  268.  
  269.  
  270. /* DOS/Windows stuff. Moved here from command.c */
  271. #if defined(MSDOS) || defined(DOS386)
  272.  
  273. # ifdef DJGPP
  274. #  include <dos.h>
  275. #  include <dir.h>              /* HBB: for setdisk() */
  276. # else
  277. #  include <process.h>
  278. # endif                         /* !DJGPP */
  279.  
  280. # ifdef __ZTC__
  281. #  define HAVE_SLEEP 1
  282. #  define P_WAIT 0
  283.  
  284. # elif defined(__TURBOC__)
  285. #  include <dos.h>        /* for sleep() prototype */
  286. #  ifndef _Windows
  287. #   define HAVE_SLEEP 1
  288. #   include <conio.h>
  289. #   include <dir.h>            /* setdisk() */
  290. #  endif                       /* _Windows */
  291. #  ifdef WIN32
  292. #   define HAVE_SLEEP 1
  293. #  endif
  294.  
  295. # else                         /* must be MSC */
  296. #  if !defined(__EMX__) && !defined(DJGPP)
  297. #   ifdef __MSC__
  298. #    include <direct.h>        /* for _chdrive() */
  299. #   endif                      /* __MSC__ */
  300. #  endif                       /* !__EMX__ && !DJGPP */
  301. # endif                        /* !ZTC */
  302.  
  303. #endif /* MSDOS */
  304.  
  305.  
  306. /* Watcom's compiler; this should probably be somewhere
  307.  * in the Windows section
  308.  */
  309. #ifdef __WATCOMC__
  310. # include <direct.h>
  311. # define HAVE_GETCWD 1
  312. #endif
  313.  
  314.  
  315. /* Misc platforms */
  316. #ifdef apollo
  317. # ifndef APOLLO
  318. #  define APOLLO
  319. # endif
  320. # define GPR
  321. #endif
  322.  
  323. #if defined(APOLLO) || defined(alliant)
  324. # define NO_LIMITS_H
  325. #endif
  326.  
  327. #ifdef sequent
  328. # define NO_LIMITS_H
  329. # define NO_STRCHR
  330. #endif
  331.  
  332. #ifdef unixpc
  333. # ifndef UNIXPC
  334. #  define UNIXPC
  335. # endif
  336. #endif
  337.  
  338. /* Autoconf related stuff
  339.  * Transform autoconf defines to gnuplot coding standards
  340.  * This is only relevant for standard ANSI headers and functions
  341.  */
  342. #ifdef HAVE_CONFIG_H
  343.  
  344. # ifndef HAVE_ERRNO_H
  345. #  define NO_ERRNO_H
  346. # endif
  347.  
  348. # ifndef HAVE_FLOAT_H
  349. #  define NO_FLOAT_H
  350. # endif
  351.  
  352. # ifndef HAVE_LIMITS_H
  353. #  define NO_LIMITS_H 
  354. # endif
  355.  
  356. # ifndef HAVE_LOCALE_H
  357. #  define NO_LOCALE_H 
  358. # endif
  359.  
  360. # ifndef HAVE_MATH_H
  361. #  define NO_MATH_H 
  362. # endif
  363.  
  364. # ifndef HAVE_STDLIB_H
  365. #  define NO_STDLIB_H 
  366. # endif
  367.  
  368. # ifndef HAVE_STRING_H
  369. #  define NO_STRING_H 
  370. # endif
  371.  
  372. # ifndef HAVE_TIME_H
  373. #  define NO_TIME_H 
  374. # endif
  375.  
  376. # ifndef HAVE_SYS_TIME_H
  377. #  define NO_SYS_TIME_H 
  378. # endif
  379.  
  380. # ifndef HAVE_SYS_TYPES_H
  381. #  define NO_SYS_TYPES_H 
  382. # endif
  383.  
  384. # ifndef HAVE_ATEXIT
  385. #  define NO_ATEXIT
  386. # endif
  387.  
  388. # ifndef HAVE_MEMCPY
  389. #  define NO_MEMCPY
  390. # endif
  391.  
  392. # ifndef HAVE_MEMMOVE
  393. #  define NO_MEMMOVE
  394. # endif
  395.  
  396. # ifndef HAVE_MEMSET
  397. #  define NO_MEMSET
  398. # endif
  399.  
  400. # ifndef HAVE_SETVBUF
  401. #  define NO_SETVBUF
  402. # endif
  403.  
  404. # ifndef HAVE_STRERROR
  405. #  define NO_STRERROR
  406. # endif
  407.  
  408. # ifndef HAVE_STRCHR
  409. #  define NO_STRCHR
  410. # endif
  411.  
  412. # ifndef HAVE_STRRCHR
  413. #  define NO_STRRCHR
  414. # endif
  415.  
  416. # ifndef HAVE_STRSTR
  417. #  define NO_STRSTR
  418. # endif
  419.  
  420. #endif /* HAVE_CONFIG_H */
  421. /* End autoconf related stuff */
  422.  
  423. #endif /* !SYSCFG_H */
  424.